
const _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault');

exports.__esModule = true;
exports.default = void 0;

const _extends2 = _interopRequireDefault(require('@babel/runtime/helpers/extends'));

const _babelHelperVueJsxMergeProps = _interopRequireDefault(require('@vue/babel-helper-vue-jsx-merge-props'));

const _utils = require('../utils');

const _functional = require('../utils/functional');

const _popup = require('../mixins/popup');

const _popup2 = _interopRequireDefault(require('../popup'));

// Utils
// Mixins
// Components
const _createNamespace = (0, _utils.createNamespace)('notify');
const createComponent = _createNamespace[0];
const bem = _createNamespace[1];

function Notify(h, props, slots, ctx) {
  const style = {
    color: props.color,
    background: props.background,
  };
  return h(_popup2.default, (0, _babelHelperVueJsxMergeProps.default)([{
    attrs: {
      value: props.value,
      position: 'top',
      overlay: false,
      duration: 0.2,
      lockScroll: false,
    },
    style,
    class: [bem([props.type]), props.className],
  }, (0, _functional.inherit)(ctx, true)]), [props.message]);
}

Notify.props = (0, _extends2.default)({}, _popup.popupMixinProps, {
  color: String,
  message: [Number, String],
  duration: [Number, String],
  className: null,
  background: String,
  getContainer: [String, Function],
  type: {
    type: String,
    default: 'danger',
  },
});

const _default = createComponent(Notify);

exports.default = _default;
